//
//  StylistViewController.m
//  XiJianChui
//
//  Created by Mac on 16/7/22.
//  Copyright © 2016年 FanShuHan. All rights reserved.
//

#import "StylistViewController.h"
#import "FaxingVC.h"

@interface StylistViewController ()

@end

@implementation StylistViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"造型师";
    self.view.backgroundColor = QhColor(239, 239, 244);
    
    [self setupTopView];
    [self setupBottomView];
}

//添加上部view
- (void)setupTopView {
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 64, QhScreenW, 250)];
    view.backgroundColor = [UIColor redColor];
    
    [self.view addSubview:view];
}

//添加底部view
- (void)setupBottomView {
    //view
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, QhScreenH - 50, QhScreenW, 50)];
    view.backgroundColor = [UIColor greenColor];
    
    //左边按钮
    UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    leftBtn.frame = CGRectMake(20, 5, 220, 40);
    leftBtn.backgroundColor = [UIColor grayColor];
    [leftBtn setTitle:@"造型师的作品" forState:UIControlStateNormal];
    [leftBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [leftBtn addTarget:self action:@selector(leftBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [view addSubview:leftBtn];
    
    //右边按钮
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    rightBtn.frame = CGRectMake(260, 5, 80, 40);
    rightBtn.backgroundColor = [UIColor grayColor];
    [rightBtn setTitle:@"打赏" forState:UIControlStateNormal];
    [rightBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [view addSubview:rightBtn];
    
    [self.view addSubview:view];
}

//leftBtn点击事件
- (void)leftBtnClick {
    FaxingVC *vc = [[FaxingVC alloc] init];
    [self.navigationController pushViewController:vc animated:YES];
}


@end
